<h2 class="grid_12">Evento: <?php echo $evento['Evento']['nombre']; ?></h2>
    &nbsp;&nbsp;&nbsp;Desde: <?php echo $this->Utilidades->fechaes($evento['Evento']['fecha_inicio']); ?>
    &nbsp;&nbsp;&nbsp;Hasta: <?php echo $this->Utilidades->fechaes($evento['Evento']['fecha_fin']); ?>                                                                              
<div class="grid_8">
    <div class="box">
        <div class="header">
            <img src="img/icons/packs/fugue/16x16/document--plus.png" alt="" width="16" height="16">
            <h3>Listado de Eventos</h3>
            <span></span>
        </div>
        <?php //comienza el contenido que quieres colocar ?>
        <div class="content">
            <table class="table" id="eventos">
                <thead>
                    <tr>                        
                        <th>Fecha</th>                        
                        <th>Acciones</th>                        
                    </tr>
                </thead>
                <tbody>
                    <?php foreach ($dias as $d): ?>
                    <div id="cuadro_<?php echo $d; ?>" title="Registro de Pistas">                       
                    </div>
                        <?php //$id = $e['Evento']['id']; ?>
                        <tr>                            
                            <td>
                                <?php echo $this->Utilidades->fechaes($d); ?>
                            </td>                            
                            <td>                                
                                <div id="dialog_<?php echo $d; ?>" style="float: left;">
                                    <?php
                                        echo $this->Html->image("icons/packs/diagona/16x16/024.png", array("title" => "Registra Pista"));
                                    ?>
                                </div>
                                <script type="text/javascript">
                                var dialogOpts = {
                                    modal: true,
                                    width: 500,
                                    position: "center"
                                };
                                $("#dialog_<?php echo $d; ?>").click(function(){
                                    $("#cuadro_<?php echo $d; ?>").dialog(dialogOpts).load("../../pistas/ajaxregistrapista/<?php echo $d; ?>/<?php echo $id_evento; ?>");
                                    //alert("click <?php echo $d; ?>");
                                });                                                    
                                </script>
                                <?php
                                    echo $this->Html->link($this->Html->image('icons/packs/diagona/16x16/016.png', array("alt" => 'Registra ', 'title' => 'Listado Pistas')), array('action' => 'listadopistas', $d, $id_evento), array('escape' => false));
                                ?>
                            </td>
                        </tr>                        
                    <?php endforeach; ?>
                </tbody>   
            </table>   
            <script defer>
                $(window).load(function() {
                    $('#eventos').dataTable();
                    $(window).resize();
                });
            </script>
        </div>
        <?php //fin del contenido a colocar   ?>
    </div> <!-- End of .box -->
</div> <!-- End of .grid_4 -->                                            
<div class="grid_4">
<?php echo $this->element('menu_eventos'); ?>
</div> <!-- End of .grid_4 -->
<?php echo $this->element('js_tablas'); ?>
<?php echo $this->element('js_forms'); ?>
<!-- End of #main_content -->
<div class="push clear"></div>